import React from 'react'
import {getDom} from "../../utils/commonfunc";
const appRoot = getDom('#root')
const modalRoot = getDom('#modal-root')

class ModalComponent extends React.Component {
    constructor(props) {
        super(props)
        this.el = document.createElement('div')
    }
    componentDidMount() {
        modalRoot.appendChild(this.el)
    }
    componentWillUnmount() {
        modalRoot.removeChild(this.element)
    }
}

export default ModalComponent
